package jdk5.generic;

import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
import java.util.Vector;
import static java.lang.System.out;

public class BoundedGenerics{
        static void printCollection(Collection<? extends Number> c){
                for(Object o : c)
                    out.println(o);
        }

        public static void main(String... args){
	List<Integer> li = new ArrayList<Integer>(10);
	printCollection(li);
	List<Long> ll = new ArrayList<Long>();
	printCollection(ll);
	//Collection<String> cs = new Vector<String>();
	//printCollection(cs);  // You want compile error
       }
}